<!doctype html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
</head>
<body>
<script type="text/javascript">
	onload  = function(){
		var ipt = document.getElementsByTagName('input');
		var arr = [ipt[0],ipt[1],ipt[2]];
		arr.forEach(function(e){
			alert(e);
		})	
	}
	
</script>
<input><input><input>

</body>
</html>